package com.hzncc.flowable_diboot.payment.excel.model;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.lang.Double;
import java.math.BigDecimal;
import java.util.List;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.diboot.core.util.D;
import com.diboot.core.util.V;
import com.diboot.file.excel.BaseExcelModel;
import com.diboot.file.excel.annotation.ExcelBindDict;
import com.diboot.file.excel.annotation.ExcelBindField;
import com.diboot.file.excel.annotation.ExcelOption;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;

import com.hzncc.flowable_diboot.entity.SapCustomer;
import lombok.Getter;
import lombok.Setter;
import org.apache.batik.parser.NumberParser;
import org.bouncycastle.util.test.NumberParsing;
import org.checkerframework.checker.units.qual.N;
import org.hibernate.validator.constraints.Length;
import jakarta.validation.constraints.NotNull;

import com.hzncc.flowable_diboot.payment.entity.PaymentRegister;


/**
* 回款登记 导入model定义
*
* @author MyName
* @version 1.0
* @date 2024-10-17
 * Copyright © MyCorp
*/
@Getter
@Setter
@ExcelIgnoreUnannotated
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 1)
public class PaymentRegisterImportModel extends BaseExcelModel {


    /**
     * 客户编号
     */
//    @Length(max = 50, message="客户编号长度应小于50")
//    @ExcelProperty(value = "客户编号",index = 1)
//    @NotNull(message = "客户编号不能为空")
//    private String customerCode;

    /**
    * 客户名称
    */
    @Length(max=100, message="客户名称长度应小于100")
    @ExcelProperty(value = "用户单位",index = 1)
    @ExcelBindField(entity = SapCustomer.class,field = "name", setIdField = "sapCustomerId")
    private String customerName;

    /**
     * Sap客户ID
     */
    private String sapCustomerId;

    /**
    * 回款类别
    */
//    @ExcelOption(dict = "paymentCategory")
//    @ExcelBindDict(type = "paymentCategory")
//    @ExcelProperty(value = "回款类别")
//    private String category;
    /**
    * 回款金额
    */
    @NotNull(message = "回款金额不能为空")
    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 13)
//    @Length(max=100, message="回款金额长度应小于100")
    @ExcelProperty(value = "回款金额",index = 2)
    @NumberFormat("0.00")
    private BigDecimal paymentAmount;
    /**
    * 回款日期
    */
    @NotNull(message = "回款日期不能为空")
    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 13)
    @DateTimeFormat(D.FORMAT_DATE_Y4MD)
    @JsonFormat(pattern = D.FORMAT_DATE_Y4MD)
    @ExcelProperty(value = "回款日期",index = 0)
    private LocalDate paymentTime;
    /**
    * 已回款金额
    */
//    @Length(max=100, message="已回款金额长度应小于100")
//    @ExcelProperty(value = "已回款金额")
//    private String receivedAmount;
    /**
    * 未认领金额
    */
//    @Length(max=100, message="未认领金额长度应小于100")
//    @ExcelProperty(value = "未认领金额")
//    private String unclaimedAmount;
    /**
    * 回款类型
    */
//    @NotNull(message = "回款类型不能为空")
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 13)
//    @ExcelOption(dict = "paymentType")
//    @ExcelBindDict(type = "paymentType")
//    @ExcelProperty(value = "回款类型")
//    private String type;
    /**
    * 银行名称
    */
    @Length(max=100, message="银行名称长度应小于100")
    @ExcelProperty(value = "银行名称",index = 3)
    private String bankName;
    /**
    * 承兑票号
    */
//    @Length(max=100, message="承兑票号长度应小于100")
//    @ExcelProperty(value = "承兑票号")
//    private String billNum;
    /**
    * 付款科目
    */
//    @Length(max=100, message="付款科目长度应小于100")
//    @ExcelProperty(value = "付款科目")
//    private String paymentItem;
    /**
    * 传阅
    */
//    @Length(max=100, message="传阅长度应小于100")
//    @ExcelProperty(value = "传阅")
//    private String copyRead;
    /**
    * 回款状态
    */
//    @ExcelOption(dict = "paymentStatus")
//    @ExcelBindDict(type = "paymentStatus")
//    @ExcelProperty(value = "回款状态")
//    private String status;
    /**
    * 备注
    */
    @Length(max=100, message="备注长度应小于100")
    @ExcelProperty(value = "备注",index = 4)
    private String remark;
    /**
    * 传阅销售人员
    */
//    @Length(max=100, message="传阅销售人员长度应小于100")
//    @ExcelProperty(value = "传阅销售人员")
//    private String salesCopyRead;
    /**
    * 公司代码
    */
//    @Length(max=100, message="公司代码长度应小于100")
//    @ExcelProperty(value = "公司代码")
//    private String oaNum;
    /**
    * 是否生成回款凭证
    */
//    @ExcelOption(dict = "yesNo")
//    @ExcelBindDict(type = "yesNo")
//    @ExcelProperty(value = "是否生成回款凭证")
//    private String certed;
    /**
    * 凭证类型
    */
//    @Length(max=100, message="凭证类型长度应小于100")
//    @ExcelProperty(value = "凭证类型")
//    private String certType;
    /**
    * 预收所属事业部
    */
//    @Length(max=100, message="预收所属事业部长度应小于100")
//    @ExcelProperty(value = "预收所属事业部")
//    private String dept;
    /**
    * 是否锁定
    */
//    @ExcelOption(dict = "yesNo")
//    @ExcelBindDict(type = "yesNo")
//    @ExcelProperty(value = "是否锁定")
//    private String locked;

}